<template>
  <h1>{{ person.name }}</h1>
  <button @click="f1">将名字传递给APP 并且改变一下</button>
</template>
  
<script>
import { reactive } from "vue";
export default {
  name: "Demo",
  props:['school'],
  setup(props,context){
    let person=reactive({
      name:'林润钿'
    })

    function f1(){
      context.emit('hello',person.name)
      alert(props.school)
    }

    return{
      person,
      f1
    }
    
  }
};
</script>
  
  <style>
</style>
  